package com.jxc.biz.impl;

import java.util.List;

import com.jxc.biz.CommodityBiz;
import com.jxc.dao.CommodityDao;
import com.jxc.entity.Commodity;
import com.jxc.util.PageBean;

public class CommodityBizImpl implements CommodityBiz {

	private CommodityDao dao;

	public PageBean findCommodityList(String hql,PageBean bean) {
		return dao.findCommodityList(hql, bean);
	}
	public Commodity findCommodity(Commodity commodity) {
		return dao.findCommodity(commodity);
	}
	public List<Commodity> getCommodity(Commodity pCommodity) {
		return dao.getCommodity(pCommodity);
	}

	public PageBean getCommodityByPage(PageBean pb, String hql) {
		return dao.getCommodityByPage(pb, hql);
	}

	public List<Commodity> getCommoityList(String sql, Object[] goods) {
		return dao.getCommoityList(sql, goods);
	}

	public void inserteCommodity(Commodity pCommodity) {
		dao.inserteCommodity(pCommodity);
	}
	public void updateCommodity(Commodity pCommodity) {
		dao.updateCommodity(pCommodity);
	}
	public Commodity getCommodityById(int id) {
		return dao.getCommodityById(id);
	}
	public CommodityDao getDao() {
		return dao;
	}

	public void setDao(CommodityDao dao) {
		this.dao = dao;
	}
}
